//
//  ZZJLCell.swift
//  demo
//
//  Created by toro宇 on 2020/2/14.
//  Copyright © 2020 CodeYu. All rights reserved.
//

import UIKit
import Then
class ZZJLCell: UITableViewCell {
    
    lazy var logoImg = UIImageView()
    lazy var titleLab = UILabel().then {
        $0.textColor = UIColor.init(hex: "707070")
        $0.font = UIFont.systemFont(ofSize: 14)
    }
    lazy var typeLab = UILabel().then {
        $0.textColor = UIColor.init(hex: "a5a5a5")
        $0.font = UIFont.systemFont(ofSize: 12)
    }
    lazy var moneyLab = UILabel().then {
        $0.textColor = UIColor.init(hex: "6c6c6c")
        $0.font = UIFont.systemFont(ofSize: 15)

    }
    lazy var timeLab = UILabel().then {
        $0.textColor = UIColor.init(hex: "a5a5a5")
        $0.font = UIFont.systemFont(ofSize: 12)

    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.selectionStyle = UITableViewCell.SelectionStyle.none
        setControls()
    }
    
    private func setControls(){
        
        self.addSubview(logoImg)
        self.addSubview(typeLab)
        self.addSubview(titleLab)
        self.addSubview(moneyLab)
        self.addSubview(timeLab)
        
        logoImg.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(15)
            make.top.equalToSuperview().offset(15)
        }
        titleLab.snp.makeConstraints { (make) in
            make.left.equalTo(logoImg.snp_rightMargin).offset(15)
            make.top.equalToSuperview().offset(10)
        }
        typeLab.snp.makeConstraints { (make) in
            make.left.equalTo(titleLab)
            make.top.equalTo(titleLab.snp_bottomMargin).offset(20)
            make.bottom.equalToSuperview().offset(-15)
        }
        moneyLab.snp.makeConstraints { (make) in
            make.right.equalToSuperview().offset(-15)
            make.top.equalTo(titleLab)
        }
        timeLab.snp.makeConstraints { (make) in
            make.right.equalTo(moneyLab)
            make.top.equalTo(typeLab)
        }
        
    }
    
    
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
